What should we do when we face tests and trials?

What should we do when we face tests and trials?